﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Timetable.Base.Entities;
using Timetable.Base.Interfaces.Repositories;
using Ninject;
using Timetable.Base.Interfaces.Validators;

namespace Timetable.Data.Services.DataServices
{
    public class GroupService: BaseDataService<Group>
    {
        [Inject]
        public IRepository<Group> GroupRepository { get; set; }

        [Inject]
        public IValidator<Group> GroupValidator { get; set; }

        public override IRepository<Group> Repository
        {
            get { return GroupRepository; }
        }

        public override IValidator<Group> Validator
        {
            get { return GroupValidator; }
        }

        public override IQueryable<Group> All()
        {
            throw new NotSupportedException();
        }

        public override Group GetById(int id)
        {
            return GroupRepository.GetById(id);
        }
    }
}
